const { exec } = require('../db/mysql')

// 登录
const login = (username='', password='') => {
  const sql = `select username,password,realname from users where username='${username}' and password='${password}';`
  const user = exec(sql).then(userData => userData)
  return user
}

module.exports = {
  login,
}